//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "unCCTVOpHolder.h"
#include "unCCTVState.h"
#include "unCCTVMain.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "AdvSmoothComboBox"
#pragma link "AdvSmoothListBox"
#pragma link "AdvGrid"
#pragma link "AdvObj"
#pragma link "BaseGrid"
#pragma resource "*.dfm"
TFrm_CCTVOpHolder *Frm_CCTVOpHolder;
//---------------------------------------------------------------------------
__fastcall TFrm_CCTVOpHolder::TFrm_CCTVOpHolder(TComponent* Owner)
        : TForm(Owner)
{
    mDisplayFrm = NULL;
    mStateFrm = NULL;
}
//---------------------------------------------------------------------------
void __fastcall TFrm_CCTVOpHolder::btnSendOpClick(TObject *Sender)
{
    ;        
}
//---------------------------------------------------------------------------

void __fastcall TFrm_CCTVOpHolder::comboOpCommandItemChanged(
      TObject *Sender, int itemindex)
{
    ShowMessage("Item Changed");
    if (gMode == OPMODE_DISPLAY)
    {
        if (mDisplayFrm == NULL)
            return;;
        mDisplayFrm->OpCommandChanged(itemindex);
    }
    else
    {
        if (mStateFrm == NULL)
            return;;
        mStateFrm->OpCommandChanged(itemindex);
    }
}
//---------------------------------------------------------------------------

void __fastcall TFrm_CCTVOpHolder::comboOpCommandParamItemChanged(
      TObject *Sender, int itemindex)
{
    if (gMode == OPMODE_DISPLAY)
    {
        if (mDisplayFrm == NULL)
            return;;
        mDisplayFrm->OpParamChanged(itemindex);
    }
    else
    {
        if (mStateFrm == NULL)
            return;;
        mStateFrm->OpParamChanged(itemindex);
    }
}
//---------------------------------------------------------------------------

